import { createApp } from 'vue'
import App from './App.vue'
// 加入router
import router from './router'
// 加入axios
import axios from 'axios'
//加入ElementPlus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

const app = createApp(App)
// 设置axios默认的访问的后台接口域名
axios.defaults.baseURL = 'http://localhost:8080/'
// 设置全局变量$http值为axios，后续可以直接使用this.$http进行操作
app.config.globalProperties.$http = axios
// 挂载router
app.use(router)
// 挂载ElementPlus
app.use(ElementPlus)

app.mount('#app')